package com.evo.chat.web.domain;

import com.evo.chat.common.base.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotEmpty;

/**
 * @author luwenzheng
 * date 2020-02-05
 */
@Entity
@Table(name = "user_info")
public class UserInfo extends BaseEntity {

    @NotEmpty(message = "用户名不能为空")
    private String name;

    @NotEmpty(message = "年龄不能为空")
    private String age;

    /**
     * 是否允许留言
     */
    private boolean allowWords = true;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public boolean isAllowWords() {
        return allowWords;
    }

    public void setAllowWords(boolean allowWords) {
        this.allowWords = allowWords;
    }

    @Override
    public String toString() {
        return "UserInfo{" +
                "name='" + name + '\'' +
                ", age='" + age + '\'' +
                ", allowWords=" + allowWords +
                '}';
    }
}
